<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.5"/>
<title>mipicsiss: xcsiss_intr_example.c File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="HTML_custom.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="xlogo_bg.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">mipicsiss
   </div>
   <div id="projectbrief">Vitis Drivers API Documentation</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.5 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Overview</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li><a href="globals.html"><span>APIs</span></a></li>
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="pages.html"><span>Examples</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('xcsiss__intr__example_8c.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">xcsiss_intr_example.c File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">Overview</h2>
<div class="textblock"><p>This file contains a design example using the <a class="el" href="struct_x_csi_ss.html" title="The XCsiSs driver instance data. ">XCsiSs</a> driver with interrupts. </p>
<p>On receiving a frame received interrupt, it will print frames received count. On receiving a short packet FIFO not empty interrupt, it will print the contents of the short packet received. On receiving DPHY, protocol or Packet level error, it will print the same On receiving any type of error interrupt the sub-system will reset</p>
<dl class="section note"><dt>Note</dt><dd>This example requires an interrupt controller connected to the processor and the MIPI CSI Rx Subsystem in the system. The Camera Sensor may need some programming before via the IIC before it starts to send any video stream.</dd></dl>
<p>For this example to display output, the user need to implement initialization of the system (CsiSs_PlatformInit) and after MIPI CSI Rx subsystem start (XCsiSs_Start) is complete, implement configuration of the video stream source in order to provide the MIPI CSI Rx Subsystem HIP input. The functions CsiSs_PlatformInit and CsiSs_StreamSrc are declared and are left up to the user implement.</p>
<pre>
MODIFICATION HISTORY:</pre><pre>Ver Who Date     Changes
</p>
<hr/>
<p>
1.0 vsa 07/21/15 Initial release
1.1 ms  01/23/17 Modified xil_printf statement in main function to
                 ensure that "Successfully ran" and "Failed" strings
                 are available in all examples. This is a fix for
                 CR-965028.
1.2 vsa 03/02/17 Added Word Count corruption interrupt
1.11 ml 11/15/23 Fix compilation errors reported with -std=c2x compiler flag
</pre> </div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a6fb058d3bf941cd9a817bb6ad7e0a819"><td class="memItemLeft" align="right" valign="top">u32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xcsiss__intr__example_8c.html#a6fb058d3bf941cd9a817bb6ad7e0a819">CsiSs_IntrExample</a> (u32 DeviceId)</td></tr>
<tr class="memdesc:a6fb058d3bf941cd9a817bb6ad7e0a819"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function is the main entry point for the interrupt example using the <a class="el" href="struct_x_csi_ss.html" title="The XCsiSs driver instance data. ">XCsiSs</a> driver.  <a href="#a6fb058d3bf941cd9a817bb6ad7e0a819">More...</a><br/></td></tr>
<tr class="separator:a6fb058d3bf941cd9a817bb6ad7e0a819"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2616eb2221d62da082b74d1a3c1ae937"><td class="memItemLeft" align="right" valign="top">u32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xcsiss__intr__example_8c.html#a2616eb2221d62da082b74d1a3c1ae937">CsiSs_PlatformInit</a> (void)</td></tr>
<tr class="memdesc:a2616eb2221d62da082b74d1a3c1ae937"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function initialize required platform-specifc peripherals.  <a href="#a2616eb2221d62da082b74d1a3c1ae937">More...</a><br/></td></tr>
<tr class="separator:a2616eb2221d62da082b74d1a3c1ae937"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a99ec12dec93c6e641d493dc67abe8093"><td class="memItemLeft" align="right" valign="top">u32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xcsiss__intr__example_8c.html#a99ec12dec93c6e641d493dc67abe8093">CsiSs_CciInit</a> (void)</td></tr>
<tr class="memdesc:a99ec12dec93c6e641d493dc67abe8093"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function initialize required IIC instance to configure and control the camera.  <a href="#a99ec12dec93c6e641d493dc67abe8093">More...</a><br/></td></tr>
<tr class="separator:a99ec12dec93c6e641d493dc67abe8093"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9c5f66194510da39e316aed63c329997"><td class="memItemLeft" align="right" valign="top">u32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xcsiss__intr__example_8c.html#a9c5f66194510da39e316aed63c329997">CsiSs_CciSetupIntrSystem</a> (void)</td></tr>
<tr class="memdesc:a9c5f66194510da39e316aed63c329997"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function setup interrupts of the IIC instance if used for the MIPI CSI Rx Subsystem.  <a href="#a9c5f66194510da39e316aed63c329997">More...</a><br/></td></tr>
<tr class="separator:a9c5f66194510da39e316aed63c329997"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af1c6b925e48cc09ea28725ed345e0476"><td class="memItemLeft" align="right" valign="top">u32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xcsiss__intr__example_8c.html#af1c6b925e48cc09ea28725ed345e0476">CsiSs_SetupIntrSystem</a> (void)</td></tr>
<tr class="memdesc:af1c6b925e48cc09ea28725ed345e0476"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function sets up the interrupt system so interrupts can occur for the MIPI CSI Rx Subsystem core.  <a href="#af1c6b925e48cc09ea28725ed345e0476">More...</a><br/></td></tr>
<tr class="separator:af1c6b925e48cc09ea28725ed345e0476"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aba92c48fbd79a81c915b28b6fb610b34"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xcsiss__intr__example_8c.html#aba92c48fbd79a81c915b28b6fb610b34">CsiSs_DphyEventHandler</a> (void *InstancePtr, u32 Mask)</td></tr>
<tr class="memdesc:aba92c48fbd79a81c915b28b6fb610b34"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function is called when a DPHY level error event is received by the MIPI CSI Rx Subsystem core.  <a href="#aba92c48fbd79a81c915b28b6fb610b34">More...</a><br/></td></tr>
<tr class="separator:aba92c48fbd79a81c915b28b6fb610b34"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a47f73352e5fdacd0a5781d75837711f1"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xcsiss__intr__example_8c.html#a47f73352e5fdacd0a5781d75837711f1">CsiSs_PktLvlEventHandler</a> (void *InstancePtr, u32 Mask)</td></tr>
<tr class="memdesc:a47f73352e5fdacd0a5781d75837711f1"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function is called when a Packet level error event is received by the MIPI CSI Rx Subsystem core.  <a href="#a47f73352e5fdacd0a5781d75837711f1">More...</a><br/></td></tr>
<tr class="separator:a47f73352e5fdacd0a5781d75837711f1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adb83f55711bd51c4c70dc552e1d080db"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xcsiss__intr__example_8c.html#adb83f55711bd51c4c70dc552e1d080db">CsiSs_ProtLvlEventHandler</a> (void *InstancePtr, u32 Mask)</td></tr>
<tr class="memdesc:adb83f55711bd51c4c70dc552e1d080db"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function is called when a Protocol decoding level error event is received by the MIPI CSI Rx Subsystem core.  <a href="#adb83f55711bd51c4c70dc552e1d080db">More...</a><br/></td></tr>
<tr class="separator:adb83f55711bd51c4c70dc552e1d080db"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa82de58a14571625b9b396dca82a5627"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xcsiss__intr__example_8c.html#aa82de58a14571625b9b396dca82a5627">CsiSs_SPktEventHandler</a> (void *InstancePtr, u32 Mask)</td></tr>
<tr class="memdesc:aa82de58a14571625b9b396dca82a5627"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function is called when a Short Packet FIFO event is received by the MIPI CSI Rx Subsystem core.  <a href="#aa82de58a14571625b9b396dca82a5627">More...</a><br/></td></tr>
<tr class="separator:aa82de58a14571625b9b396dca82a5627"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a76ecf43e07a31fe614b1ef75fc345eec"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xcsiss__intr__example_8c.html#a76ecf43e07a31fe614b1ef75fc345eec">CsiSs_ErrEventHandler</a> (void *InstancePtr, u32 Mask)</td></tr>
<tr class="memdesc:a76ecf43e07a31fe614b1ef75fc345eec"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function is called when a Other errors event is received by the MIPI CSI Rx Subsystem core.  <a href="#a76ecf43e07a31fe614b1ef75fc345eec">More...</a><br/></td></tr>
<tr class="separator:a76ecf43e07a31fe614b1ef75fc345eec"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a13a51bb809fbfe41556ab4f92cf8b4db"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xcsiss__intr__example_8c.html#a13a51bb809fbfe41556ab4f92cf8b4db">CsiSs_FrameRcvdEventHandler</a> (void *InstancePtr, u32 Mask)</td></tr>
<tr class="memdesc:a13a51bb809fbfe41556ab4f92cf8b4db"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function is called when a Frame is received by the MIPI CSI Rx Subsystem core.  <a href="#a13a51bb809fbfe41556ab4f92cf8b4db">More...</a><br/></td></tr>
<tr class="separator:a13a51bb809fbfe41556ab4f92cf8b4db"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa93f4f357d4911b56121f95a2917cd1a"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xcsiss__intr__example_8c.html#aa93f4f357d4911b56121f95a2917cd1a">Delay</a> (u32 Seconds)</td></tr>
<tr class="memdesc:aa93f4f357d4911b56121f95a2917cd1a"><td class="mdescLeft">&#160;</td><td class="mdescRight">For Microblaze we use an assembly loop that is roughly the same regardless of optimization level, although caches and memory access time can make the delay vary.  <a href="#aa93f4f357d4911b56121f95a2917cd1a">More...</a><br/></td></tr>
<tr class="separator:aa93f4f357d4911b56121f95a2917cd1a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xcsiss__intr__example_8c.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main</a> ()</td></tr>
<tr class="memdesc:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="mdescLeft">&#160;</td><td class="mdescRight">This is the main function for <a class="el" href="struct_x_csi_ss.html" title="The XCsiSs driver instance data. ">XCsiSs</a> interrupt example.  <a href="#ae66f6b31b5ad750f1fe042a706a4e3d4">More...</a><br/></td></tr>
<tr class="separator:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="a99ec12dec93c6e641d493dc67abe8093"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">u32 CsiSs_CciInit </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function initialize required IIC instance to configure and control the camera. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">None.</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><ul>
<li>XST_SUCCESS if required IIC is initialized and configured successfully.</li>
<li>XST_FAILURE, otherwise.</li>
</ul>
</dd></dl>
<dl class="section note"><dt>Note</dt><dd>None. </dd></dl>

<p>Referenced by <a class="el" href="xcsiss__intr__example_8c.html#a6fb058d3bf941cd9a817bb6ad7e0a819">CsiSs_IntrExample()</a>.</p>

</div>
</div>
<a class="anchor" id="a9c5f66194510da39e316aed63c329997"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">u32 CsiSs_CciSetupIntrSystem </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function setup interrupts of the IIC instance if used for the MIPI CSI Rx Subsystem. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">None</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><ul>
<li>XST_SUCCESS if IIC interrupt is configured successfully.</li>
<li>XST_FAILURE,if IIC interrupt is failed to configure</li>
</ul>
</dd></dl>
<dl class="section note"><dt>Note</dt><dd>None. </dd></dl>

<p>Referenced by <a class="el" href="xcsiss__intr__example_8c.html#af1c6b925e48cc09ea28725ed345e0476">CsiSs_SetupIntrSystem()</a>.</p>

</div>
</div>
<a class="anchor" id="aba92c48fbd79a81c915b28b6fb610b34"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void CsiSs_DphyEventHandler </td>
          <td>(</td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>InstancePtr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u32&#160;</td>
          <td class="paramname"><em>Mask</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function is called when a DPHY level error event is received by the MIPI CSI Rx Subsystem core. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">InstancePtr</td><td>is a pointer to the <a class="el" href="struct_x_csi_ss.html" title="The XCsiSs driver instance data. ">XCsiSs</a> instance. </td></tr>
    <tr><td class="paramname">Mask</td><td>of interrupt which caused this event</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>None.</dd></dl>
<dl class="section note"><dt>Note</dt><dd>Use the XCsiSs_SetCallback driver function to set this function as the handler for DPHY level error event. </dd></dl>

<p>Referenced by <a class="el" href="xcsiss__intr__example_8c.html#a6fb058d3bf941cd9a817bb6ad7e0a819">CsiSs_IntrExample()</a>, and <a class="el" href="xcsiss__intr__example_8c.html#af1c6b925e48cc09ea28725ed345e0476">CsiSs_SetupIntrSystem()</a>.</p>

</div>
</div>
<a class="anchor" id="a76ecf43e07a31fe614b1ef75fc345eec"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void CsiSs_ErrEventHandler </td>
          <td>(</td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>InstancePtr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u32&#160;</td>
          <td class="paramname"><em>Mask</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function is called when a Other errors event is received by the MIPI CSI Rx Subsystem core. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">InstancePtr</td><td>is a pointer to the <a class="el" href="struct_x_csi_ss.html" title="The XCsiSs driver instance data. ">XCsiSs</a> instance. </td></tr>
    <tr><td class="paramname">Mask</td><td>of interrupt which caused this event</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>None.</dd></dl>
<dl class="section note"><dt>Note</dt><dd>Use the XCsiSs_SetCallback driver function to set this function as the handler for Other error event. </dd></dl>

<p>Referenced by <a class="el" href="xcsiss__intr__example_8c.html#a6fb058d3bf941cd9a817bb6ad7e0a819">CsiSs_IntrExample()</a>, and <a class="el" href="xcsiss__intr__example_8c.html#af1c6b925e48cc09ea28725ed345e0476">CsiSs_SetupIntrSystem()</a>.</p>

</div>
</div>
<a class="anchor" id="a13a51bb809fbfe41556ab4f92cf8b4db"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void CsiSs_FrameRcvdEventHandler </td>
          <td>(</td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>InstancePtr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u32&#160;</td>
          <td class="paramname"><em>Mask</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function is called when a Frame is received by the MIPI CSI Rx Subsystem core. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">InstancePtr</td><td>is a pointer to the <a class="el" href="struct_x_csi_ss.html" title="The XCsiSs driver instance data. ">XCsiSs</a> instance.</td></tr>
    <tr><td class="paramname">Mask</td><td>of interrupt which caused this event</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>None.</dd></dl>
<dl class="section note"><dt>Note</dt><dd>Use the XCsiSs_SetCallback driver function to set this function as the handler for Frame Received event. </dd></dl>

<p>Referenced by <a class="el" href="xcsiss__intr__example_8c.html#a6fb058d3bf941cd9a817bb6ad7e0a819">CsiSs_IntrExample()</a>, and <a class="el" href="xcsiss__intr__example_8c.html#af1c6b925e48cc09ea28725ed345e0476">CsiSs_SetupIntrSystem()</a>.</p>

</div>
</div>
<a class="anchor" id="a6fb058d3bf941cd9a817bb6ad7e0a819"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">u32 CsiSs_IntrExample </td>
          <td>(</td>
          <td class="paramtype">u32&#160;</td>
          <td class="paramname"><em>DeviceId</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function is the main entry point for the interrupt example using the <a class="el" href="struct_x_csi_ss.html" title="The XCsiSs driver instance data. ">XCsiSs</a> driver. </p>
<p>This function will set up the system with interrupts handlers.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">DeviceId</td><td>is the unique device ID of the MIPI CSI Rx Subsystem core.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><ul>
<li>XST_FAILURE if the system setup failed.</li>
<li>XST_SUCCESS should never return since this function, if setup was successful, is blocking.</li>
</ul>
</dd></dl>
<dl class="section note"><dt>Note</dt><dd>If system setup was successful, this function is blocking in order to illustrate interrupt handling. </dd></dl>

<p>References <a class="el" href="struct_x_csi_ss___config.html#accf7178f1f7fc0ba40fee2e61ca159bc">XCsiSs_Config::BaseAddr</a>, <a class="el" href="struct_x_csi_ss.html#a9e11a24b49b049a215fe243afd1e9741">XCsiSs::Config</a>, <a class="el" href="xcsiss__intr__example_8c.html#a99ec12dec93c6e641d493dc67abe8093">CsiSs_CciInit()</a>, <a class="el" href="xcsiss__intr__example_8c.html#aba92c48fbd79a81c915b28b6fb610b34">CsiSs_DphyEventHandler()</a>, <a class="el" href="xcsiss__intr__example_8c.html#a76ecf43e07a31fe614b1ef75fc345eec">CsiSs_ErrEventHandler()</a>, <a class="el" href="xcsiss__intr__example_8c.html#a13a51bb809fbfe41556ab4f92cf8b4db">CsiSs_FrameRcvdEventHandler()</a>, <a class="el" href="xcsiss__intr__example_8c.html#a47f73352e5fdacd0a5781d75837711f1">CsiSs_PktLvlEventHandler()</a>, <a class="el" href="xcsiss__intr__example_8c.html#a2616eb2221d62da082b74d1a3c1ae937">CsiSs_PlatformInit()</a>, <a class="el" href="xcsiss__intr__example_8c.html#adb83f55711bd51c4c70dc552e1d080db">CsiSs_ProtLvlEventHandler()</a>, <a class="el" href="xcsiss__intr__example_8c.html#af1c6b925e48cc09ea28725ed345e0476">CsiSs_SetupIntrSystem()</a>, <a class="el" href="xcsiss__intr__example_8c.html#aa82de58a14571625b9b396dca82a5627">CsiSs_SPktEventHandler()</a>, <a class="el" href="xcsiss__intr__example_8c.html#aa93f4f357d4911b56121f95a2917cd1a">Delay()</a>, <a class="el" href="group__csiss.html#gaf30fdaf13ba08d8612f8e20ab21d8ff2">XCsiSs_Activate()</a>, <a class="el" href="group__csiss.html#ga8fde229b1ad93697e0cf3f1710b2db7e">XCsiSs_CfgInitialize()</a>, <a class="el" href="group__csiss.html#ga3b35fe38bf1b55eb8107f892caf67103">XCsiSs_Configure()</a>, <a class="el" href="group__csiss.html#ga7144ae932dcf2ddf7ad15e7ec7565bba">XCsiSs_IntrHandler()</a>, <a class="el" href="group__csiss.html#gaff8115edc1de28ca0524d489e736480c">XCsiSs_LookupConfig()</a>, <a class="el" href="group__csiss.html#ga3c63d232d9c7c19a7206fe10d5713509">XCsiSs_ReportCoreInfo()</a>, <a class="el" href="group__csiss.html#ga0436d17627c2acd4ed542efbbb584fab">XCsiSs_Reset()</a>, and <a class="el" href="group__csiss.html#ga806675fd5dc154656f12869b549e916a">XCsiSs_SetCallBack()</a>.</p>

<p>Referenced by <a class="el" href="xcsiss__intr__example_8c.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main()</a>.</p>

</div>
</div>
<a class="anchor" id="a47f73352e5fdacd0a5781d75837711f1"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void CsiSs_PktLvlEventHandler </td>
          <td>(</td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>InstancePtr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u32&#160;</td>
          <td class="paramname"><em>Mask</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function is called when a Packet level error event is received by the MIPI CSI Rx Subsystem core. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">InstancePtr</td><td>is a pointer to the <a class="el" href="struct_x_csi_ss.html" title="The XCsiSs driver instance data. ">XCsiSs</a> instance. </td></tr>
    <tr><td class="paramname">Mask</td><td>of interrupt which caused this event</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>None.</dd></dl>
<dl class="section note"><dt>Note</dt><dd>Use the XCsiSs_SetCallback driver function to set this function as the handler for Packet level error event. </dd></dl>

<p>Referenced by <a class="el" href="xcsiss__intr__example_8c.html#a6fb058d3bf941cd9a817bb6ad7e0a819">CsiSs_IntrExample()</a>, and <a class="el" href="xcsiss__intr__example_8c.html#af1c6b925e48cc09ea28725ed345e0476">CsiSs_SetupIntrSystem()</a>.</p>

</div>
</div>
<a class="anchor" id="a2616eb2221d62da082b74d1a3c1ae937"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">u32 CsiSs_PlatformInit </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function initialize required platform-specifc peripherals. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">None.</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><ul>
<li>XST_SUCCESS if required peripherals are initialized and configured successfully.</li>
<li>XST_FAILURE, otherwise.</li>
</ul>
</dd></dl>
<dl class="section note"><dt>Note</dt><dd>None. </dd></dl>

<p>Referenced by <a class="el" href="xcsiss__intr__example_8c.html#a6fb058d3bf941cd9a817bb6ad7e0a819">CsiSs_IntrExample()</a>.</p>

</div>
</div>
<a class="anchor" id="adb83f55711bd51c4c70dc552e1d080db"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void CsiSs_ProtLvlEventHandler </td>
          <td>(</td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>InstancePtr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u32&#160;</td>
          <td class="paramname"><em>Mask</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function is called when a Protocol decoding level error event is received by the MIPI CSI Rx Subsystem core. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">InstancePtr</td><td>is a pointer to the <a class="el" href="struct_x_csi_ss.html" title="The XCsiSs driver instance data. ">XCsiSs</a> instance. </td></tr>
    <tr><td class="paramname">Mask</td><td>of interrupt which caused this event</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>None.</dd></dl>
<dl class="section note"><dt>Note</dt><dd>Use the XCsiSs_SetCallback driver function to set this function as the handler for Protocol Decoding level error </dd></dl>

<p>Referenced by <a class="el" href="xcsiss__intr__example_8c.html#a6fb058d3bf941cd9a817bb6ad7e0a819">CsiSs_IntrExample()</a>, and <a class="el" href="xcsiss__intr__example_8c.html#af1c6b925e48cc09ea28725ed345e0476">CsiSs_SetupIntrSystem()</a>.</p>

</div>
</div>
<a class="anchor" id="af1c6b925e48cc09ea28725ed345e0476"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">u32 CsiSs_SetupIntrSystem </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function sets up the interrupt system so interrupts can occur for the MIPI CSI Rx Subsystem core. </p>
<p>The function is application-specific since the actual system may or may not have an interrupt controller. The MIPI CSI Subsystem core could be directly connected to a processor without an interrupt controller. The user should modify this function to fit the application.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">None</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><ul>
<li>XST_SUCCESS if interrupt setup was successful.</li>
<li>A specific error code defined in "xstatus.h" if an error occurs.</li>
</ul>
</dd></dl>
<dl class="section note"><dt>Note</dt><dd>None. </dd></dl>

<p>References <a class="el" href="xcsiss__intr__example_8c.html#a9c5f66194510da39e316aed63c329997">CsiSs_CciSetupIntrSystem()</a>, <a class="el" href="xcsiss__intr__example_8c.html#aba92c48fbd79a81c915b28b6fb610b34">CsiSs_DphyEventHandler()</a>, <a class="el" href="xcsiss__intr__example_8c.html#a76ecf43e07a31fe614b1ef75fc345eec">CsiSs_ErrEventHandler()</a>, <a class="el" href="xcsiss__intr__example_8c.html#a13a51bb809fbfe41556ab4f92cf8b4db">CsiSs_FrameRcvdEventHandler()</a>, <a class="el" href="xcsiss__intr__example_8c.html#a47f73352e5fdacd0a5781d75837711f1">CsiSs_PktLvlEventHandler()</a>, <a class="el" href="xcsiss__intr__example_8c.html#adb83f55711bd51c4c70dc552e1d080db">CsiSs_ProtLvlEventHandler()</a>, <a class="el" href="xcsiss__intr__example_8c.html#aa82de58a14571625b9b396dca82a5627">CsiSs_SPktEventHandler()</a>, <a class="el" href="group__csiss.html#ga7144ae932dcf2ddf7ad15e7ec7565bba">XCsiSs_IntrHandler()</a>, and <a class="el" href="group__csiss.html#ga806675fd5dc154656f12869b549e916a">XCsiSs_SetCallBack()</a>.</p>

<p>Referenced by <a class="el" href="xcsiss__intr__example_8c.html#a6fb058d3bf941cd9a817bb6ad7e0a819">CsiSs_IntrExample()</a>.</p>

</div>
</div>
<a class="anchor" id="aa82de58a14571625b9b396dca82a5627"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void CsiSs_SPktEventHandler </td>
          <td>(</td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>InstancePtr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u32&#160;</td>
          <td class="paramname"><em>Mask</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function is called when a Short Packet FIFO event is received by the MIPI CSI Rx Subsystem core. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">InstancePtr</td><td>is a pointer to the <a class="el" href="struct_x_csi_ss.html" title="The XCsiSs driver instance data. ">XCsiSs</a> instance.</td></tr>
    <tr><td class="paramname">Mask</td><td>of interrupt which caused this event</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>None.</dd></dl>
<dl class="section note"><dt>Note</dt><dd>Use the XCsiSs_SetCallback driver function to set this function as the handler for Short Packet FIFO error event. </dd></dl>

<p>References <a class="el" href="struct_x_csi_ss.html#a9f94784dc621d2cf0213645392f2e877">XCsiSs::SpktData</a>, and <a class="el" href="group__csiss.html#gad50495d88d4013368ccf7886554cfbe4">XCsiSs_GetShortPacket()</a>.</p>

<p>Referenced by <a class="el" href="xcsiss__intr__example_8c.html#a6fb058d3bf941cd9a817bb6ad7e0a819">CsiSs_IntrExample()</a>, and <a class="el" href="xcsiss__intr__example_8c.html#af1c6b925e48cc09ea28725ed345e0476">CsiSs_SetupIntrSystem()</a>.</p>

</div>
</div>
<a class="anchor" id="aa93f4f357d4911b56121f95a2917cd1a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Delay </td>
          <td>(</td>
          <td class="paramtype">u32&#160;</td>
          <td class="paramname"><em>Seconds</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>For Microblaze we use an assembly loop that is roughly the same regardless of optimization level, although caches and memory access time can make the delay vary. </p>
<p>Just keep in mind that after resetting or updating the PHY modes, the PHY typically needs time to recover.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">Number</td><td>of seconds to sleep</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>None</dd></dl>
<dl class="section note"><dt>Note</dt><dd>None </dd></dl>

<p>Referenced by <a class="el" href="xcsiss__intr__example_8c.html#a6fb058d3bf941cd9a817bb6ad7e0a819">CsiSs_IntrExample()</a>.</p>

</div>
</div>
<a class="anchor" id="ae66f6b31b5ad750f1fe042a706a4e3d4"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int main </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This is the main function for <a class="el" href="struct_x_csi_ss.html" title="The XCsiSs driver instance data. ">XCsiSs</a> interrupt example. </p>
<p>If the CsiSs_IntrExample function which sets up the system succeeds, this function will wait for the interrupts. Once a connection event or pulse is detected, CsiSs will RX device capabilities and re-start the subsystem.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">None.</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><ul>
<li>XST_FAILURE if the interrupt example was unsuccessful.</li>
</ul>
</dd></dl>
<dl class="section note"><dt>Note</dt><dd>Unless setup failed, main will never return since CsiSs_IntrExample is blocking (it is waiting on interrupts for Hot-Plug-Detect (HPD) events. </dd></dl>

<p>References <a class="el" href="xcsiss__intr__example_8c.html#a6fb058d3bf941cd9a817bb6ad7e0a819">CsiSs_IntrExample()</a>.</p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
	<p class="footer">&copy; Copyright 2015-2022 Xilinx, Inc. All Rights Reserved.</p>
	<p class="footer">&copy; Copyright 2022-2023 Advanced Micro Devices, Inc. All Rights Reserved.</p>
</div>
</body>
</html>
